<!--督导结果统计-->
<template>
  <div class="wrapper-container">
    <el-form ref="form" class="my-form">
       <el-row class="single-row">
        <el-col :span="24">
          <el-row class="item-row">
            <el-col class="name-col" :span="8"> 启用时间 </el-col>
            <el-col class="content-col" :span="16" >
              <InputItem
              style="width: 385px;"
                :name="''"
                :value="time"
                @input="
                  (e) => {
                    nums = e;
                  }
                "
              ></InputItem> 
            </el-col>
          </el-row>
        </el-col>
      </el-row>
      <el-row class="single-row">
        <el-col :span="24">
          <el-row class="item-row">
            <el-col class="name-col" :span="8"> 督导指标体系选择 </el-col>
            <el-col class="content-col" :span="16">
              <el-select
                v-model="system"
                style="width: 40%"
                size="small"
                placeholder="请选择"
              >
                <el-option
                  v-for="item in systemList"
                  :key="item.value"
                  :label="item.guidename"
                  :value="item.guidename"
                >
                </el-option>
              </el-select>
            </el-col>
          </el-row>
        </el-col>
      </el-row>
    </el-form>

    <div class="bottom-block">
      <div style="width: 300px; display: flex; justify-content: space-around">
        <ButtonItem
          :name="'保存'"
          :link="''"
          :icon="''"
          :buttonColor="'yellow'"
          @click="srcSaves"
        ></ButtonItem>

       
      </div>
    </div>
  </div>
</template>

<script>


import {srcPjguideadd,srcSaves,getEvaluateBatch} from "@/api/teacher/admin";

import SelectItem from "../../../components/SelectItem.vue";
import InputItem from "../../../components/InputItem.vue";
import ButtonItem from "../../../components/ButtonItem.vue";
export default {
  components: {
    SelectItem,
    InputItem,
    ButtonItem,
  },
  data() {
    return {
      zbtxid:"",
      system: "",
      systemList: [
        {
          value: "2021教学评价7月",
          label: "2021教学评价7月",
        },
        {
          value: "2021教学评价8月",
          label: "2021教学评价8月",
        },
      ],
      time: "",
   
    };
  },

  methods: {
    getEvaluateBatch(){
      getEvaluateBatch().then(res=>{
        if(res.data.code == 200){
          this.system = res.data.data.zbtxmc
        }
      })
    },
     srcPjguideadd() {
      return new Promise(() => {
        srcPjguideadd().then(res => {
         this.systemList = res.data.data
         console.log(res.data.data,"aaaaa")
         // this.midifyDialogtableData =res.data.data
        })
      })
    },
    srcSaves(){
     
      for(let i=0;i<this.systemList.length;i++){
        if(this.system == this.systemList[i].guidename){
          this.zbtxid=this.systemList[i].guideid
          
        }
      }
      console.log(this.zbtxid)
      let obj = {
        zbtxid : this.zbtxid,
        guideid : this.zbtxid
      }
      return new Promise(() => {
        srcSaves(obj).then(res => {
          if (200 === res.data.code && "操作成功" === res.data.msg) {
            this.$message.info("操作成功");
          }
        })
      })
      
    },
    getCurrentTime() {
        //获取当前时间并打印
        var _this = this;
    　　let yy = new Date().getFullYear();
    　　let mm = new Date().getMonth()+1;
    　　let dd = new Date().getDate();
    　　let hh = new Date().getHours();
    　　let mf = new Date().getMinutes()<10 ? '0'+new Date().getMinutes() : new Date().getMinutes();
    　　let ss = new Date().getSeconds()<10 ? '0'+new Date().getSeconds() : new Date().getSeconds();
    　　_this.gettime = yy+'/'+mm+'/'+dd+' '+hh+':'+mf+':'+ss;
      this.time = _this.gettime
    　　console.log(this.time)  
    }
  },
  created() {
   
  },
  mounted() {
    this.getEvaluateBatch()
    this.srcPjguideadd()
    this.getCurrentTime()
   
  },
};
</script>
<style lang="less" scoped>
.search-container {
  justify-content: flex-start !important;
}

.search-button {
  cursor: pointer;
  box-sizing: border-box;
  display: flex;
  flex-direction: row;
  align-items: center;
  justify-content: center;
  width: 70px;
  height: 27px;
  background: #f1f8fe;
  border: 1px solid #51aef6;
  border-radius: 6px;

  > span {
    font-size: 14px;
    font-family: Microsoft YaHei;
    font-weight: 400;
    color: #51aef6;
  }

  > img {
    width: 19px;
    height: 19px;
    margin-right: 4px;
  }
}

.table-container {
  margin-top: 30px;

  .el-table td,
  .el-table th.is-leaf,
  .el-table--border,
  .el-table--group {
    border-color: #c7d7eb;
  }

  .el-table__header tr,
  .el-table__header th {
    padding: 0;
    height: 76px;
    background-color: #edf2f9;
    font-size: 16px;
    font-family: Microsoft YaHei;
    font-weight: bold;
    line-height: 20px;
    color: #004ca7;
  }

  .el-table__body tr,
  .el-table__body td {
    padding: 0;
    height: 86px;
  }

  .wrapper-button {
    display: flex;
    flex-direction: column;
    align-items: center;

    > div {
      margin-bottom: 8px;
    }
  }
}
</style>

<style lang="less" scoped>
.item-row .el-col {
  display: flex;
  align-items: center;
  min-height: 60px;
  border-right: none !important;
}
.item-row .el-col:not(:first-child) {
  border-left: 1px solid rgba(0, 76, 167, 0.39);
}
.single-row .el-col:not(:last-child) {
  border-right: 1px solid rgba(0, 76, 167, 0.39);
}
.my-form .single-row:not(:last-child) {
  border-bottom: 1px solid rgba(0, 76, 167, 0.39);
}
.name-col {
  justify-content: center;
  font-size: 16px;
  font-weight: bold;
  color: #004ca7;
  background: rgba(77, 129, 192, 0.1);
}
.content-col {
  padding-left: 10%;
}
.wrapper-container {
  .my-form {
    width: 100%;
    border: 1px solid rgba(0, 76, 167, 0.8);
    margin: 57px auto 19px;
    border-radius: 9px;
  }
  .button-group {
    padding-top: 20px;
    width: 915px;
    margin: 0 auto;
    text-align: center;
    > div {
      display: inline-block;
      font-size: 18px;
      padding: 6px 22px;
      border-radius: 6px;
      &:nth-child(1) {
        color: #f3b815;
        border: 1px solid #f3b815;
        background: #fff6ef;
        margin: 0 40px;
      }
    }
  }
}

@import "../../../styles/special.less";
.bottom-block {
  display: flex;
flex-direction: column;
  justify-content: flex-end;
      align-items: center;
  .text {
    font-size: 14px;
    font-family: Microsoft YaHei;
    font-weight: 400;
    line-height: 39px;
    color: #004ca7;
  }
}
.content-div {
  max-width: 200px;
}
.comment-div {
  overflow: hidden;
  text-overflow: ellipsis;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
}
.table-container::v-deep .el-table__header th {
  border-color: #c7d7eb !important;
  padding-left: 10px;
}
.filter-button::v-deep .el-radio-button .el-radio-button__inner {
  border-radius: 6px !important;
  border: 1px solid rgb(245, 134, 106);
  color: rgb(245, 134, 106);
  background-color: rgb(254, 237, 226);
}
.filter-button::v-deep
  .el-radio-button__orig-radio:checked
  + .el-radio-button__inner {
  border: 1px solid rgb(245, 134, 106);
  color: white;
  background-color: rgb(245, 134, 106);
}
.wrapper-container {
  width: 1711px;
  margin: 0 auto;
}
.table-container {
  margin-top: 30px;

  .table-data {
    width: 100%;
    border: 0.8px solid #004ca7;
    border-radius: 9px;
    font-size: 14px;
    font-family: Microsoft YaHei;
    font-weight: 400;
    color: #004ca7;
  }
}

.srcSave-button {
  width: 87px;
  height: 36px;
  line-height: 36px;
  background: #fff6ef;
  border: 1px solid #f3b815;
  border-radius: 6px;
  font-size: 18px;
  font-family: Microsoft YaHei;
  font-weight: 400;
  color: #f3b815;
  text-align: center;
  margin: 82px auto;
}

.zuoyou {
  width: 200px;
  display: flex;
  flex-direction: row;
  justify-content: space-between;
}
</style>
